package com.slipper.sfts.member.front;

import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

import com.slipper.common.bo.Result;
import com.slipper.common.util.ResultUtil;
import com.slipper.sfts.api.member.bo.MemberAccountBO;
import com.slipper.sfts.api.member.service.IMemberAccountSv;
import com.slipper.sfts.member.service.MemberAccountService;

import java.util.List;

@RestController
public class MemberAccountSv implements IMemberAccountSv {
    @Resource
    private MemberAccountService memberAccountService;
    
    @Override
    public Result<MemberAccountBO> queryBy(String id) {
        return ResultUtil.successResult(memberAccountService.queryBy(id));
    }

    @Override
    public Result<List<MemberAccountBO>> queryList(MemberAccountBO bo) {
        return ResultUtil.successResult(memberAccountService.queryList(bo));
    }
    
    @Override
    public Result<List<MemberAccountBO>> queryPage(MemberAccountBO bo) {
        return ResultUtil.successResult(memberAccountService.queryPage(bo));
    }
    
    @Override
    public Result<?> save(MemberAccountBO bo) {
        return ResultUtil.saveResult(memberAccountService.save(bo), bo);
    }
    
    @Override
    public Result<?> delete(MemberAccountBO bo) {
        return ResultUtil.deleteResult(memberAccountService.delete(bo));
    }
}
